
<div id="header">
	<div class="grid-960" id="header-pt">
		<img src="<?php echo $img_dir;?>pt-big-logo-emb-white.png"/>
		<p>PINOYTUNER</p>
		<p>BELIEVE IN MUSIC</p>
	</div>
	<div id="header-channels">
		<?php foreach($featured_feed as $key=>$value):?>
		<?php
			if($key==0)
			{
				$channel = "DIG RADIO";
				$id = "dig";
			}
			else if($key==1)
			{
				$channel = "PLANET JAZZ";
				$id = "planet";
			}
			else
			{
				$channel = "RICE RADIO";
				$id = "rice";
			}
		?>
		<div class="large-4 columns channel-latest" style="background: url('<?php echo IMAGE_UPLOAD_DIR.$value['strPicture'];?>') right center no-repeat; background-size: cover;">
			<div class="right channel-name" id="<?php echo $id;?>-name">
				<?php echo $channel;?>
			</div>
			<div class="clear"></div>
			<div class="channel-text large-12">
				<p class="channel-text-heading">Features</p>
				<a class="channel-title-anchor" href="<?php echo base_url().'digradio/content/'.get_type_name($value['fk-tb_mas_content_types']).'/'.$value['intID'].'/'.simplify_title($value['strTitle']); ?>"><p class="channel-text-title"><?php echo $value['strTitle'];?></p></a>
				<p class="channel-text-desc"><?php echo word_limiter($value['strSecondary'],20);?></p>
				<p class="channel-text-auth">by <?php echo $value['strAuthor'];?></p>
				<div class="clear"></div>
			</div>
			<p class="left channel-text-date">
				<?php
					$date = date_create($value['dteStart']);
					echo date_format($date, 'F j, Y');
				?>
			</p>
			<p class="right channel-text-vc">
				53 <img src="<?php echo $img_dir;?>eye.png"/> 10 <img src="<?php echo $img_dir;?>speech.png"/>
			</p>
			<div class="clear"></div>
			<a id="<?php echo $id;?>-play-btn" class="player-button" target=""  href="#"  onclick = "window.open('<?php echo base_url().'player/load_player/digradio'  ?>','Player','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=600,left='+(screen.availWidth/2-350)+',top='+(screen.availHeight/2-250)+'');return false;" >
				<span class="large-2 columns">
					<i class="icon-play icon-white"></i>
				</span>
				<p class="large-10 columns">
					PLAY ME
				</p>
				<div class="clear"></div>
			</a>
			<div class="clear"></div>
		</div>
		<?php endforeach;?>
		<div class="clear"></div>
	</div>
</div>
<div id="main-content-container">
	<div id="main-content" class="grid-960">
		<div class="ad-leaderboard">
			<iframe style="width:720px;height:90px;" class="banner-content" src="<?php echo base_url().'digradio/ads/homepage-leaderboard';?>"></iframe>
		</div>
		<div class="section-container grid-960">
			<div id="news-section" class="left" data-off="5">
				<input type="hidden" value="5" id="news-off"/>
				<?php foreach($news_feed as $news):?>
				<?php   
					if($news['fk-tb_mas_community'] == 1)
					{
						$news['channel_name'] = "DIG RADIO";
                        $news['channel_sub'] = "digradio";
					}
					else if($news['fk-tb_mas_community'] == 2)
					{
						$news['channel_name'] = "PLANET JAZZ";
                        $news['channel_sub'] = "planetjazz";
					}
					else
					{
						$news['channel_name'] = "RICE RADIO";
                        $news['channel_sub'] = "riceradio";
					}
				?>
				<div class="news-feed">
					<div class="news-feed-text left">
						<div class="feed-content">
							<div class="feed-channel-name left <?php echo strtolower(substr($news['channel_name'],0,(strpos($news['channel_name']," "))));?>">
								<p><?php echo $news['channel_name'];?></p>
							</div>
							<div class="feed-channel-type right">
								<p>
									<?php
										if($news['fk-tb_mas_content_types'] == 1)
											echo "News";
										else if($news['fk-tb_mas_content_types'] == 2)
											echo "Features";
										else if($news['fk-tb_mas_content_types'] == 3)
											echo "Blogs";
										else if($news['fk-tb_mas_content_types'] == 4)
											echo "Gallery";
										else if($news['fk-tb_mas_content_types'] == 5)
											echo "Show";
										else if($news['fk-tb_mas_content_types'] == 14)
											echo "Reviews";
										else if($news['fk-tb_mas_content_types'] == 15)
											echo "Event";
										else
											echo " "
									?>
								</p>
							</div>
							<div class="clear"></div>
							<br/>
							<p class="feed-title">
                                 <a href="<?php echo base_url().$news['channel_sub'].'/content/'.get_type_name($news['fk-tb_mas_content_types']).'/'.$news['intID'].'/'.simplify_title($news['strTitle']); ?>">
								<?php echo $news['strTitle'];?>
                                    </a>
							</p>
							<p class="feed-desc">
								<?php echo $news['strSecondary'];?>
							</p>
							<p class="feed-author">
								by <?php echo $news['strAuthor'];?>
							</p>
						</div>
						<hr/>
						<div class="feed-stat">
							<p class="left feed-text-date">
								<?php
									$date = date_create($news['dteStart']);
									echo date_format($date, 'F j, Y');
								?>
							</p>
							<p class="right feed-text-vc">
								&nbsp; <img src="<?php echo $img_dir;?>eye.png"/> &nbsp; <img src="<?php echo $img_dir;?>speech.png"/>
							</p>
							<div class="clear"></div>
						</div>
					</div>
					<div class="news-feed-img left" style="background: url('<?php echo IMAGE_UPLOAD_DIR.$news['strPicture'];?>');background-size: cover;background-position: center center;" height="301px" width="261px" >
						
					</div>
					<div class="clear"></div>
				</div>
				<?php endforeach;?>
			</div>
			<div id="ad-vertical-container" class="left">
				<div class="ad-vertical">
					AdVertical1 160x600
				</div>
				<div class="ad-vertical">
					AdVertical2 160x600
				</div>
			</div>
			<div class="clear"></div>
			<a href="javascript:void(0);" id="news-section-more-link">More Here</a>
		</div>
		<div class="grid-960" id="ad-boxes-container">
			<div class="ad-box left">
				AdBox1 300x250
			</div>
			<div class="ad-box left">
				AdBox2 300x250
			</div>
			<div class="ad-box left">
				AdBox3 300x250
			</div>
			<div class="clear"></div>
		</div>
		<div class="section-container grid-960" id="video-section">
			<div id="video-header">
				<p>
				<?php if(isset($video_feed['intID'])):?>
					<?php echo $video_feed['strTitle'];?>
				<?php endif;?>
				</p>
			</div>
			<div id="video-container">
				<iframe width="854" height="480" src="//www.youtube.com/embed/<?php echo $video_feed['strYoutubeId'];?>" frameborder="0" allowfullscreen></iframe>
			</div>
			<a href="https://www.youtube.com/user/pinoytuner" target="_blank" id="more-videos-btn">MORE VIDEOS HERE</a>
		</div>
		<div class="section container grid-960" id="social-section">
			<div class="social-row" id="social-first-row">
				<div class="social-large-box left">
					Social First Row A
				</div>
				<div class="social-small-box left">
					Social First Row B
				</div>
				<div class="clear"></div>
			</div>
			<div class="social-row" id="social-second-row">
				<div class="social-small-box left">
					Social Second Row A
				</div>
				<div class="social-large-box left">
					Social Second Row B
				</div>
				<div class="clear"></div>
			</div>
		</div>
		<div class="ad-leaderboard bottom-leaderboard">
			<p>Ad Space 728x90px</p>
		</div>
		<div class="section-container grid-960" id="gallery-section">
			<p id="gallery-header">Gallery</p>
			<br/>
			<div id="gallery-images-container">
				<?php foreach($gallery_feed as $image): ?>
				<?php
					if($image['fk-tb_mas_community'] == 1)
					{
						$image['channel_name'] = "DIG RADIO";
                        $image['channel_sub'] = "digradio";
					}
					else if($image['fk-tb_mas_community'] == 2)
					{
						$image['channel_name'] = "PLANET JAZZ";
                        $image['channel_sub'] = "planetjazz";
					}
					else
					{
						$image['channel_name'] = "RICE RADIO";
                        $image['channel_sub'] = "riceradio";
					}
				?>
				<div class="gallery-image left" style="background:url('<?php echo IMAGE_UPLOAD_DIR.$image['strPicture'];?>'); background-size:cover;background-position:center center;">
					<a class="gallery-anchor" href="<?php echo base_url().$image['channel_sub'].'/content/'.get_type_name($image['fk-tb_mas_content_types']).'/'.$image['intID'].'/'.simplify_title($image['strTitle']); ?>"></a>
				</div>
				<?php endforeach;?>
				<div class="clear"></div>
			</div>
		</div>
	</div>
	<div id="footer-section">
		<hr/>
	</div>
</div>